
#include "Water.h"

int useWindow = 1;

int waterSensor() 
{
  // put your setup code here, to run once:
  int value = analogRead(waterline);
  if(value<500 && useWindow == 1)
  {
    closeWindow();
    useWindow = 0;
  }else if(value >= 500)
  {
    useWindow = 1;
  }
  return value;
  
}

void Waterinit() 
{
  // put your main code here, to run repeatedly:
  pinMode(waterline,INPUT);
}
